const path = require("path");
const { CleanWebpackPlugin } = require('clean-webpack-plugin')

module.exports = {
  mode: "none",
  entry: "./src/main.js",
  output: {
    filename: "bundle.js",
    path: path.resolve(__dirname, "dist"),
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        use: "babel-loader",
      },
      {
        test: /\.css$/,
        use: ["style-loader", "css-loader"],
      },
      {
        test: /\.png$/,
        use: {
          loader: "url-loader",
          options: {
            limit: 10 * 1024,
          },
        },
      },
      {
        test: /\.md$/,
        use: ['html-loader', './md-loader.js']
      }
    ],
  },
  plugins: [
    new CleanWebpackPlugin()
  ]
};
